export const _saveStorage = (key, value) => {
  let val = typeof (value) == 'string' ? value : JSON.stringify(value)
  localStorage.setItem(key, val);
}
export const _getStorage = (key) => {
  let val = localStorage.getItem(key)
  let checkType = (value) => {
    try {
      JSON.parse(value)
      return true
    } catch (err) {
      return false
    }
  }
  if (val != null) {
    return checkType(val) ? JSON.parse(val) : val
  }
}
export const _removeStorage = (key) => {
  localStorage.removeItem(key)
}